#include <bits/stdc++.h>
using namespace std;
const int maxn = 3000+5;
int n;
int bucket[maxn];
int a[maxn];

int main(){
    cin >> n;
    for(int i =1;i<=n;i++)
        cin >> a[i];
    for(int i =2;i<=n;i++) {
        int t = a[i]-a[i-1]; //10^9-1
        if ( t < 0) 
            t= -t;
        if( t >=3000) {
            cout << "Not jolly" << endl;
            return 0;
        }
        bucket[t]++;
    }
    for(int i=1;i<n;i++)
    {
        if(bucket[i] == 0) {
            cout << "Not jolly" << endl;
            return 0;
        }
    }
    cout << "Jolly" << endl;
    return 0;
}